﻿using LitJson;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

class Other : Part
{
    public enum OtherType
    {
        None,
        CommandRoom,
    }
    public OtherType otherType { get { return m_OtherType; } }
    OtherType m_OtherType;
    public Other()
    {
        m_Type = ItemType.OTHER_PART;
    }
    public override void LoadPrefab(JsonData json)
    {
        base.LoadPrefab(json);
        IDictionary<string, JsonData> jsond = json.ValueAsObject();
        if (jsond.ContainsKey("OtherType"))
            m_OtherType = (OtherType)jsond["OtherType"].ValueAsInt();
    }
    public override void Copy(Item item)
    {
        base.Copy(item);
        var other = item as Other;
        if (Utils.CheckReferenceIsNull(other))
            return;
        m_OtherType = other.m_OtherType;
    }
}